package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 oms_order
 *
 * @author ruoyi
 * @date 2024-11-29
 */
@Data
public class OmsOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderSn;

    /** 批次id */
    @Excel(name = "批次id")
    private Long batchId;

    @Excel(name = "用户id")
    private Long userId;

    /** 用户帐号 */
    @Excel(name = "用户帐号")
    private String memberUsername;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 采购价 */
    @Excel(name = "采购价")
    private BigDecimal purchasePrice;

    /** 订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单 */
    @Excel(name = "订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单")
    private Long status;

    /** 自动确认时间（天） */
    @Excel(name = "自动确认时间", readConverterExp = "天=")
    private Long autoConfirmDay;

    /** 删除状态：0->未删除；1->已删除 */
    @Excel(name = "删除状态：0->未删除；1->已删除")
    private Integer deleteStatus;

    /** 确认收货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "确认收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    private Long deptId;

    private String deptName;

    private PmsBatch pmsBatch;

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setOrderSn(String orderSn)
    {
        this.orderSn = orderSn;
    }

    public String getOrderSn()
    {
        return orderSn;
    }
    public void setBatchId(Long batchId)
    {
        this.batchId = batchId;
    }

    public Long getBatchId()
    {
        return batchId;
    }
    public void setMemberUsername(String memberUsername)
    {
        this.memberUsername = memberUsername;
    }

    public String getMemberUsername()
    {
        return memberUsername;
    }
    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }
    public void setPurchasePrice(BigDecimal purchasePrice)
    {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchasePrice()
    {
        return purchasePrice;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setAutoConfirmDay(Long autoConfirmDay)
    {
        this.autoConfirmDay = autoConfirmDay;
    }

    public Long getAutoConfirmDay()
    {
        return autoConfirmDay;
    }
    public void setDeleteStatus(Integer deleteStatus)
    {
        this.deleteStatus = deleteStatus;
    }

    public Integer getDeleteStatus()
    {
        return deleteStatus;
    }
    public void setReceiveTime(Date receiveTime)
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime()
    {
        return receiveTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderSn", getOrderSn())
            .append("batchId", getBatchId())
            .append("memberUsername", getMemberUsername())
            .append("totalAmount", getTotalAmount())
            .append("purchasePrice", getPurchasePrice())
            .append("status", getStatus())
            .append("autoConfirmDay", getAutoConfirmDay())
            .append("deleteStatus", getDeleteStatus())
            .append("receiveTime", getReceiveTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
